package com.woniu.order.feign;

import com.woniu.order.dto.DistributorDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

@FeignClient(name = "trader-server" )
public interface ZfTraderFeign {
    /**
     * 查询所有分销商
     */
    @GetMapping("/distributor/queryAll")
    List<DistributorDto> queryAll();

    /**
     * 根据分销商编号查询分销商
     */
    @GetMapping("/distributor/queryByCode/{code}")
    DistributorDto queryByCode(@PathVariable("code") String code);
}
